#define SYMBOL_CATENATE(arg1, arg2) arg1##arg2

#define SYMBOL_CATENATE_WITH_MACRO(arg1, arg2) SYMBOL_CATENATE(arg1, arg2)

#define ATTR(arg) arg

#define COUNT_PARMS_IMP(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, NUM, ...) NUM
#define COUNT_PARMS(...) ATTR(COUNT_PARMS_IMP(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))
